package spring.chatroom.java_chatroom.common.utils;

import lombok.Getter;

import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

public class UserIdsAndSessionId {
    // userId friendId 的升序链表的hash值
    @Getter
    private static ConcurrentHashMap<Integer, Integer> map = new ConcurrentHashMap<>();

    public static void push(Integer hashCode, Integer sessionId) {
        map.put(hashCode, sessionId);
    }

    public static Integer get(Integer hashCode) {
        return map.get(hashCode);
    }

}
